(function () {

    "use strict";

    var api = {
        userInfoUrl: '/api/user/userInfo'
    };

    sm.controller('wx-center-member-index-controller', ['$scope', '$http', function ($scope, $http){

        $scope.userInfo = {};

        /**
         * 会员等级
         * @type {[*]}
         */
        $scope.levels = [{
            label: "黄金会员"
        }, {
            label: "至尊会员"
        }, {
            label: "普通会员"
        }];


        $scope.getUserInfo = function () {
            $http.get(api.userInfoUrl).success(function (res) {
                if (res.state) {
                    $scope.userInfo = res.data;
                }
            });
        };

        $scope.getUserInfo();

    }]);
})();

